package cqrtplm.mapper;

import com.alibaba.fastjson.JSONObject;
import com.ty.basic.entity.org.UserDO;
import com.ty.basic.vo.AttributeVO;
import cqrtplm.entity.ProjectDevOrderDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.BaseMapper;

import java.math.BigInteger;
import java.util.List;

/**
 * @Author：lotus
 * @DATE: 2025/7/7 13:38
 */

@Mapper
public interface ProjectDevOrderMapper extends BaseMapper<ProjectDevOrderDO>{

    List<ProjectDevOrderDO> queryProjectDevOrderByNumber(@Param("Number")String Number);

    List<ProjectDevOrderDO> queryProjectDevOrderByName(@Param("Name")String Number);

    ProjectDevOrderDO queryLastedCreateProDevCode(@Param("devCode")String devCode, @Param("devLevel") String devLevel);

    ProjectDevOrderDO queryProjectDevOrderProjectCode(@Param("projectCode") String projectCode);

    List<ProjectDevOrderDO> queryAllDevOrder(String projectCode);

    List<ProjectDevOrderDO> queryDevCodeByProduceLine(@Param("name") String name);

    List<ProjectDevOrderDO> queryDevCodeByDevCode(@Param("name") String name);

    List<JSONObject> batchQueryProductOidByProjectNumber(@Param("list") List<String> list);

    @Select("select * from VIEW_TY_IBA where ATTRIBUTEENNAME=#{type} AND OBJBASEOID=#{oid}")
    AttributeVO selectPrjById(BigInteger oid,String type);

    ProjectDevOrderDO selectDevOrder(String projectCode);

    UserDO getUserByOid(String name);

    List<ProjectDevOrderDO> selectByNumberAndName(@Param("number") String number, @Param("projectNameList")List<String> projectNameList, @Param("projectDevCodeList")List<String> projectDevCodeList);

    List<String> selectModelByDevCode(@Param("devCode") String devCode);

    String querySeriesByDevCode(String name);

    List<String> selectProjectNumberByKey(@Param("devOrderNumber") String devOrderNumber);
}
